<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body data-user-id="{{ user.id|default:'' }}">
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <!--  加载静态文件  -->
    {% load static %}
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="{% static 'css/1.css' %}">
    <link rel="stylesheet" href="{% static 'css/2.css' %}">
    <link rel="stylesheet" href="{% static 'css/classif.css' %}">
    <link rel="stylesheet" href="{% static 'css/login.css' %}">
    <link rel="stylesheet" href="{% static 'css/regster.css' %}">
    <title>{{ title }}</title>
</head>
<body>
    <div class="container">
        <!-- 顶部搜索栏 -->
        <div class="top-search">
            <form class="search-form" action="" method="get">
                <input type="text" class="search-input" name="q" placeholder="搜索产品...">
                <button type="submit" class="search-btn">搜索</button>
            </form>
        </div>

        <!-- 导航栏 -->
        <nav class="navbar">
            <ul class="navbar-nav">
                <li><a href="{% url 'index:index' %}" class="{% if request.resolver_match.url_name == 'home' %}active{% endif %}">首页</a></li>
                <li><a href="{% url 'commodity:classification' %}" class="{% if request.resolver_match.url_name == 'categories' %}active{% endif %}">分类</a></li>
                <li><a href="{% url 'shopper:loginsuss' %}" class="{% if request.resolver_match.url_name == 'profile' %}active{% endif %}">个人中心</a></li>
            </ul>
        </nav>

        <!-- 内容区域 -->
        <!-- 内容接口 -->
        {% block content %}
        {% endblock content %}
    </div>
</body>
</html>
</body>
</html>